package com.clover.framework.constant;

/**
 * 日志类别
 */
public enum LogType {
	SAVE(1, "保存"),
	DELETE(2, "删除"),
	LIST(3, "查阅"),
	VIEW(4, "查阅"),
	LOGIN(5, "登录"),
	LOGOUT(6, "退出"),
	RESTORE(7, "恢复"),
	IMPORT(8, "导入"),
	SEND(9, "发送"),
	UPDATE_PWS(10, "修改密码"),
	RESET_PWS(11, "重置密码"),
	VIRTUAL_DEL(12, "逻辑删除"),
	RESET_MEMBER_PWS(13, "重置会员密码"),
	MEMBER_STOP(14, "会员停用"),
	;

	private Integer code;
	private String desc;

	LogType(Integer code, String desc) {
		this.code = code;
		this.desc = desc;
	}

	public static LogType setLogType(Integer code){
		for (LogType logType : LogType.values()) {
			if(logType.getCode().equals(code))
				return logType;
		}
		return null;
	}

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
}
